Skip to content

Add KingFisher Flex driver for local BDZ execution - #1627

Draft
GRiveraDT wants to merge 4 commits into
PyLabRobot:mainfrom
GRiveraDT:kingfisher-flex-support
Draft

GRiveraDT wants to merge 4 commits into
PyLabRobot:mainfrom
GRiveraDT:kingfisher-flex-support

Conversation

@GRiveraDT

Copy link
Copy Markdown
Contributor

Adds KingFisher Flex support for executing local BindIt BDZ files with the matching 96DW head, tip comb and plates. PLR validates the complete export, preserves its generated command sequence, and can handle loading, unloading and protocol pauses through asynchronous confirmation callbacks. Callbacks replace the corresponding instrument pauses; physical Start remains available when callbacks are omitted.

The driver uses pylabrobot.io.HID for identification, explicit initialization, serialized execution, progress/temperature events and abort. Unsupported exports fail before execution, and errors, timeouts or cancellation invalidate the session without retrying motion. The PR includes offline inspection/audit commands, a usage notebook, API documentation and self-contained simulated tests.

Hardware validation covers firmware 1.01.0 on macOS with mixing, bead collection/release, precollection/postmix, both drying positions, timed pauses/loops, reagent-addition confirmations and 37 °C heating. Tip-comb attachment is not verified by firmware completion; the driver remains experimental. Protocol generation, upload, other head/plate formats and virtual advancement of onboard pauses are outside this implementation. Onboard inventory and launch are available, with launch validated only through the first loading prompt.

Validation:

  • KingFisher package, HID transport and CLI: 97 tests and 83 parameterized checks passed (10 existing ElementTree deprecation warnings in the shared BDZ tests).
  • Type checking and lint/format checks for the Flex package.
  • Notebook structure and code syntax validated without executing hardware cells. The Sphinx build passes on the original base; after updating to current main, the full build reports autosummary warnings in unrelated resource/API pages. No Flex documentation warnings were reported.
  • Offline preflight and simulated execution of 18 local BDZ inputs in both physical and host-confirmed pause modes.

@GRiveraDT
GRiveraDT marked this pull request as ready for review November 13, 2026 01:21
@GRiveraDT
GRiveraDT requested a review from a team as a code owner November 13, 2026 01:21
@GRiveraDT
GRiveraDT marked this pull request as draft November 17, 2026 00:32
Comment thread docs/_static/devices.json
Comment on lines +2162 to +2163
"status": "wip",
"needs_hardware_testing": true,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you tested this on hardware already?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice addition!

parser = argparse.ArgumentParser(description=__doc__)
commands = parser.add_subparsers(dest="operation", required=True)
inspect = commands.add_parser("inspect", help="Inspect a Flex .bdz without USB access")
inspect.add_argument("path", type=Path)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe name this inspect-bdz or even plr dev kingfisher-flex bdz inspect as new substructure so that we can save inspect for another use in the future?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was with respect to inspect commands, shithub messed up the link

@rickwierenga

Copy link
Copy Markdown
Member

made a few small changes:

  • Shared HID framing and BDZ container parsing between KingFisher drivers.
  • Kept device-specific command protocols separate.
  • Replaced ScriptedHID with unittest.mock.
  • Split installation and CLI docs into separate pages.
  • Shortened hello-world and added onboard protocol examples.
  • Deleted the validation page.

how does this look? if you like it and verified on hardware and look into changes above then let's merge it tomorrow

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants